package com.zifeng.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.math.BigDecimal;
import java.util.Date;

/**
 * 船舶委托对象 assignment
 *
 * @author zifeng
 * @date 2025-03-27
 */
@Data
public class Assignment {
    private static final long serialVersionUID = 1L;

    private long id;

    private int masterId;

    private int clientId;

    /**
     * 货物类型
     */
    private String cargoType;

    /**
     * 货物重量
     */
    private BigDecimal cargoWeight;

    /**
     * $column.columnComment
     */
    private String origin;

    /**
     * $column.columnComment
     */
    private String destination;

    /**
     * 价格（运输价格，拍卖成交价格）
     */
    private long price;

    private String detail;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date beginDate;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date endDate;

    private int status;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createAt;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateAt;

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("masterId", getMasterId())
                .append("clientId", getClientId())
                .append("cargoType", getCargoType())
                .append("cargoWeight", getCargoWeight())
                .append("detail", getDetail())
                .append("price", getPrice())
                .append("beginDate", getBeginDate())
                .append("endDate", getEndDate())
                .append("status", getStatus())
                .append("createAt", getCreateAt())
                .append("updateAt", getUpdateAt())
                .toString();
    }
}
